home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mobiclic 75
/
MOBICLIC 75.ISO
/
pc
/
DATA
/
TCHATCHE
/
doggy75-84.cst
/
00107_Script_gestion_drapeaux
< prev
next >
Wrap
Text File
|
2005-06-13
|
3KB
|
119 lines
-- gestion des drapeaux
property s, nom,dernierSon
global langue, pistePremierDrapeau,pisteInfoBulle,laboActif,sonIntLangues
global interLangues
on beginSprite me
s = me.SpriteNum
nom = sprite(s).member.name
LC = nom.char[nom.char.count]
if LC = "a" then pistePremierDrapeau = s
suff = suffixeLangue()
if LC = suff then
sprite(s).member = member("drapeau1" & LC)
else
sprite(s).member = member("drapeau0" & LC)
end if
end
on MouseEnter me
if _movie.pauseState() then exit
if interLangues=0 then exit
if laboActif=1 then exit
if controleTcha02()=0 then exit
if sprite(s).member.name contains "drapeau1" then exit
_player.cursor(280)
sprite(s).member = nom & "_1"
-- affichage de l'info bulle correspondant au bouton
xH = sprite(s).locH - 120
xV = sprite(s).locV - 10
nomBulle = "tBulleLangue" & nom.char[9] & "_" & suffixeLangue()
sprite(pisteInfoBulle).width = member(nomBulle).width
sprite(pisteInfoBulle).height = member(nomBulle).height
sprite(1+pisteInfoBulle).member = member(nomBulle)
_movie.updateStage()
sprite(1+pisteInfoBulle).locH = xH
sprite(1+pisteInfoBulle).locV = xV
_movie.updateStage()
sprite(pisteInfoBulle).rect = sprite(1+pisteInfoBulle).rect + rect(0,0,0,2)
sprite(pisteInfoBulle).visible =1
sprite(1+pisteInfoBulle).visible =1
-- jouer le son correspondant au bouton
if sound(3).status = 3 then exit
if sonIntLangues = 0 then exit
LBout = ["Drapeau0d","Drapeau0a","Drapeau0b","Drapeau0c"]
p = getPos(LBout,nom)
if p<>0 then nomSon = "bout" & string(p+6)
memSon = dernierSon
sound(4).volume = sound(3).volume
sound(4).playFile("@/sons_tchatche/" & nomSon & suffixeLangue())
dernierSon = memSon
end
on mouseLeave
if _movie.pauseState() then exit
if interLangues=0 then exit
if laboActif=1 then exit
if controleTcha02()=0 then exit
_player.cursor(-1)
-- dissimulation des info bulles
sprite(pisteInfoBulle).visible=0
sprite(1+pisteInfoBulle).visible=0
if sprite(s).member.name contains "drapeau1" then exit
sprite(s).member = nom
coupeSon 4
end
on mouseUp me
if laboActif=1 then exit
if interLangues=0 then exit
if controleTcha02()=0 then exit
_player.cursor(-1)
-- dissimulation des info bulles
sprite(pisteInfoBulle).visible=0
sprite(1+pisteInfoBulle).visible=0
lettreLangue = the last char of nom
L = ["a","b","c","d"]
langue = getPos(L,lettreLangue)
nomD = nom
put "1" into char 8 of nomD
sprite(s).member = nomD & "_2"
majDrapeaux
choixLangue
end
on majDrapeaux
compteur=0
repeat with i = pistePremierDrapeau to pistePremierDrapeau+3
compteur = 1+compteur
if compteur<>langue then
nomD = sprite(i).member.name
if nomD contains "Drapeau" then
LC = nomD.char[9]
sprite(i).member = member("drapeau0" & LC)
end if
end if
end repeat
end
-- empΩcher le chgt de langue pendant un jeu tcha02
on controleTcha02
if _movie.name contains "02" then
if _movie.frame > label("0") and _movie.frame < label("fin") then
return 0
else
return 1
end if
else
return 1
end if
end